package com.cskaoyan.mapper;

import com.cskaoyan.bean.pojo.User;
import com.cskaoyan.bean.pojo.UserExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.List;

@Component
public interface UserMapper {

    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    String selectPasswordByUsername(@Param("username") String username);

    Integer selectIdByUsername(@Param("username") String username);

    Integer queryValueIdByUserId(@Param("userId") Integer userId);

    Integer queryTypeByUserId(@Param("userId") Integer userId);

    Integer queryIdByUserId(@Param("userId") Integer userId);

    String queryNameById(@Param("id") int id);

    String queryBriefById(@Param("id") int id);

    String queryPicUrlById(@Param("id") int id);

    BigDecimal queryRetailPriceById(@Param("id") int id);

    User selectOneByUserName(String username);
}